.water-well-data {
  position: relative;
  user-select: none;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  // 集水井图标
  .well-icon {
    position: absolute;
    // 位置 58px 787px, 大小 32px 36px (相对于基准位置)
    left: 0px;   // 图标在组件最左侧
    top: 7px;    // 图标在组件顶部
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;

    &:hover {
      transform: scale(1.1);
      filter: brightness(1.2) saturate(1.2);
    }

    &:active {
      transform: scale(1.05);
    }
  }

  // 数据区域
  .data-area {
    position: absolute;
    // 位置基于图标右侧: 104px-58px=46px, 791px-787px=4px
    // 大小包含背景和数字: 80px宽, 24px高
    left: 46px;   // 32px(图标宽) + 14px(间距) = 46px
    top: 4px;     // 垂直居中对齐
    width: 80px;  // 背景宽度
    height: 24px; // 背景高度
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;

    // 渐变背景
    .gradient-background {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      // 复杂渐变背景: linear-gradient(90deg, rgba(52,165,255,0) 0%, rgba(52,165,255,0.39) 27%, rgba(52,165,255,0.45) 51%, rgba(52,165,255,0.35) 79%, rgba(0,139,255,0) 100%)
      background: linear-gradient(
        90deg,
        var(--gradient-bg-0) 0%,
        var(--gradient-bg-27) 27%,
        var(--gradient-bg-51) 51%,
        var(--gradient-bg-79) 79%,
        var(--gradient-bg-100) 100%
      );
      opacity: var(--gradient-bg-opacity);
      border-radius: 2px;
      transition: all 0.3s ease;
    }

    // 数据值
    .data-value {
      position: absolute;
      // 位置 124px (相对数据区域: 124-104=20px)
      left: 20px;   // 在80px宽度内居中偏左
      top: 0;
      // DINAlternate Bold, 20px, #1AD7FF, 行高24px, 居中对齐
      font-family: DINAlternate, sans-serif;
      text-align: center;
      font-style: normal;
      line-height: 24px;
      letter-spacing: 0.71px;
      transition: all 0.3s ease;
      z-index: 3;

      // 渐变文字效果
      &.gradient-text {
        background: linear-gradient(90deg, var(--gradient-text-start) 0%, var(--gradient-text-end) 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
      }
    }

    // 数据单位
    .data-unit {
      position: absolute;
      // 位置 149px (相对数据区域: 149-104=45px)
      left: 45px;   // 紧跟数据值
      top: 4px;     // 稍微下移对齐
      // SourceHanSansSC Medium, 14px, #FFFFFF, 行高16px
      font-family: SourceHanSansSC, sans-serif;
      text-align: left;
      font-style: normal;
      line-height: 16px;
      transition: color 0.3s ease;
      z-index: 3;
    }

    &:hover {
      .gradient-background {
        opacity: calc(var(--gradient-bg-opacity) + 0.2);
        filter: brightness(1.2);
      }

      .data-value {
        transform: scale(1.05);
        filter: brightness(1.2);
      }

      .data-unit {
        color: #FFFFFF !important;
        filter: brightness(1.2);
      }
    }
  }

  // 状态标签
  .status-label {
    position: absolute;
    // 位置 130px 819px (相对组件: 130-58=72px, 819-787=32px)
    left: 72px;   // 在数据区域下方居中
    top: 32px;    // 在数据区域下方
    // SourceHanSansSC Medium, 14px, #FFFFFF, 行高16px, 居中对齐
    font-family: SourceHanSansSC, sans-serif;
    text-align: center;
    font-style: normal;
    line-height: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;

    &:hover {
      color: #FFFFFF !important;
      transform: scale(1.05);
      filter: brightness(1.2);
    }

    &:active {
      transform: scale(1);
    }
  }

  // 悬停效果
  &:hover {
    transform: translateY(-2px);

    .well-icon {
      filter: brightness(1.3) saturate(1.3);
    }
  }

  &:active {
    transform: translateY(0);
  }

  // 主题样式
  &.dark {
    // 默认深色主题
  }

  &.light {
    .data-value {
      color: #1565C0 !important;

      &.gradient-text {
        background: linear-gradient(90deg, #1565C0 0%, #42A5F5 100%) !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
      }
    }

    .data-unit,
    .status-label {
      color: rgba(0, 0, 0, 0.8) !important;
    }

    .data-area {
      .gradient-background {
        background: linear-gradient(
          90deg,
          rgba(33, 150, 243, 0) 0%,
          rgba(33, 150, 243, 0.2) 27%,
          rgba(33, 150, 243, 0.3) 51%,
          rgba(33, 150, 243, 0.25) 79%,
          rgba(25, 118, 210, 0) 100%
        ) !important;
      }
    }

    &:hover {
      .data-unit,
      .status-label {
        color: rgba(0, 0, 0, 1) !important;
      }
    }
  }

  // 响应式设计
  @media (max-width: 768px) {
    .well-icon {
      width: 28px !important;
      height: 32px !important;
    }

    .data-area {
      left: 40px;
      width: 70px;
      height: 20px;

      .data-value {
        font-size: 18px !important;
        left: 16px;
      }

      .data-unit {
        font-size: 12px !important;
        left: 38px;
        top: 2px;
      }
    }

    .status-label {
      font-size: 12px !important;
      left: 60px;
      top: 28px;
    }
  }

  @media (max-width: 480px) {
    .well-icon {
      width: 24px !important;
      height: 28px !important;
    }

    .data-area {
      left: 32px;
      width: 60px;
      height: 18px;

      .data-value {
        font-size: 16px !important;
        left: 12px;
      }

      .data-unit {
        font-size: 10px !important;
        left: 32px;
        top: 2px;
      }
    }

    .status-label {
      font-size: 10px !important;
      left: 48px;
      top: 24px;
    }
  }

  // 焦点可访问性
  &:focus {
    outline: 2px solid rgba(26, 215, 255, 0.5);
    outline-offset: 2px;
  }

  .well-icon:focus,
  .data-area:focus,
  .status-label:focus {
    outline: 2px solid rgba(26, 215, 255, 0.8);
    outline-offset: 2px;
  }

  // 高对比度模式
  @media (prefers-contrast: high) {
    .data-area .gradient-background {
      opacity: 0.8 !important;
      border: 1px solid rgba(52, 165, 255, 0.5) !important;
    }

    .data-value,
    .data-unit,
    .status-label {
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
      font-weight: bold !important;
    }

    .well-icon {
      filter: contrast(1.5) !important;
    }
  }

  // 减少动画
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition: none !important;
      transform: none !important;
      animation: none !important;
    }

    &:hover {
      transform: none !important;
    }

    .well-icon:hover,
    .data-value:hover,
    .status-label:hover {
      transform: none !important;
    }
  }

  // 数据状态
  &.loading {
    opacity: 0.7;
    pointer-events: none;

    .data-value {
      animation: pulse 1.5s ease-in-out infinite;
    }

    &::after {
      content: '';
      position: absolute;
      top: 50%;
      right: 5px;
      width: 12px;
      height: 12px;
      margin-top: -6px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: #1AD7FF;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      z-index: 10;
    }
  }

  &.warning {
    .data-area .gradient-background {
      background: linear-gradient(
        90deg,
        rgba(255, 152, 0, 0) 0%,
        rgba(255, 152, 0, 0.39) 27%,
        rgba(255, 152, 0, 0.45) 51%,
        rgba(255, 152, 0, 0.35) 79%,
        rgba(255, 111, 0, 0) 100%
      ) !important;
    }

    .data-value {
      color: #FF9800 !important;
      animation: alertPulse 2s ease-in-out infinite;

      &.gradient-text {
        background: linear-gradient(90deg, #FF8F00 0%, #FFB74D 100%) !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
      }
    }

    .status-label {
      color: #FF9800 !important;
    }
  }

  &.danger {
    .data-area .gradient-background {
      background: linear-gradient(
        90deg,
        rgba(244, 67, 54, 0) 0%,
        rgba(244, 67, 54, 0.39) 27%,
        rgba(244, 67, 54, 0.45) 51%,
        rgba(244, 67, 54, 0.35) 79%,
        rgba(211, 47, 47, 0) 100%
      ) !important;
    }

    .data-value {
      color: #F44336 !important;
      animation: dangerPulse 1s ease-in-out infinite;

      &.gradient-text {
        background: linear-gradient(90deg, #D32F2F 0%, #F44336 100%) !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
      }
    }

    .status-label {
      color: #F44336 !important;
      animation: dangerPulse 1s ease-in-out infinite;
    }

    .well-icon {
      animation: shake 0.5s ease-in-out infinite;
    }
  }

  &.success {
    .data-area .gradient-background {
      background: linear-gradient(
        90deg,
        rgba(76, 175, 80, 0) 0%,
        rgba(76, 175, 80, 0.39) 27%,
        rgba(76, 175, 80, 0.45) 51%,
        rgba(76, 175, 80, 0.35) 79%,
        rgba(46, 125, 50, 0) 100%
      ) !important;
    }

    .data-value {
      color: #4CAF50 !important;

      &.gradient-text {
        background: linear-gradient(90deg, #2E7D32 0%, #4CAF50 100%) !important;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
      }
    }

    .status-label {
      color: #4CAF50 !important;
    }
  }

  &.disabled {
    pointer-events: none;
    opacity: 0.5;

    * {
      filter: grayscale(1);
    }
  }

  // 动画关键帧
  @keyframes pulse {
    0%, 100% {
      opacity: 0.6;
    }
    50% {
      opacity: 1;
    }
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes alertPulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.1);
      filter: brightness(1.3);
    }
  }

  @keyframes dangerPulse {
    0%, 100% {
      transform: scale(1);
      filter: brightness(1);
    }
    50% {
      transform: scale(1.15);
      filter: brightness(1.5);
    }
  }

  @keyframes shake {
    0%, 100% {
      transform: translateX(0);
    }
    25% {
      transform: translateX(-2px);
    }
    75% {
      transform: translateX(2px);
    }
  }

  // 特殊效果
  &.enhanced {
    &::before {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      background: linear-gradient(45deg, transparent, rgba(26, 215, 255, 0.3), transparent);
      border-radius: 6px;
      z-index: -1;
      animation: borderFlow 3s linear infinite;
    }

    .data-value {
      animation: dataGlow 2s ease-in-out infinite;
    }
  }

  @keyframes borderFlow {
    0% {
      transform: rotate(0deg);
      opacity: 0.5;
    }
    100% {
      transform: rotate(360deg);
      opacity: 0.5;
    }
  }

  @keyframes dataGlow {
    0%, 100% {
      text-shadow: 0 0 5px rgba(26, 215, 255, 0.5);
    }
    50% {
      text-shadow: 0 0 15px rgba(26, 215, 255, 0.8), 0 0 25px rgba(26, 215, 255, 0.6);
    }
  }

  // 错误状态
  &.error {
    .data-area .gradient-background {
      background: rgba(255, 87, 34, 0.8) !important;
    }

    &::after {
      content: '数据异常';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(255, 0, 0, 0.9);
      color: white;
      padding: 2px 6px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 500;
      z-index: 15;
    }
  }

  // 更新状态
  &.updating {
    .data-value {
      animation: updateAnimation 0.8s ease-in-out;
    }

    .status-label {
      animation: statusUpdate 1s ease-in-out;
    }
  }

  @keyframes updateAnimation {
    0%, 100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.2);
      opacity: 0.7;
      filter: brightness(1.5);
    }
  }

  @keyframes statusUpdate {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
      filter: brightness(1.3);
    }
  }

  // 异常状态指示
  &.abnormal {
    .status-label {
      color: #FF6B6B !important;
      animation: abnormalBlink 2s ease-in-out infinite;
    }

    .data-area .gradient-background {
      background: linear-gradient(
        90deg,
        rgba(255, 107, 107, 0) 0%,
        rgba(255, 107, 107, 0.39) 27%,
        rgba(255, 107, 107, 0.45) 51%,
        rgba(255, 107, 107, 0.35) 79%,
        rgba(255, 77, 77, 0) 100%
      ) !important;
    }
  }

  @keyframes abnormalBlink {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.6;
      transform: scale(1.05);
    }
  }

  // 监控状态
  &.monitoring {
    .well-icon {
      animation: monitorPulse 3s ease-in-out infinite;
    }

    .data-area .gradient-background {
      animation: backgroundPulse 4s ease-in-out infinite;
    }
  }

  @keyframes monitorPulse {
    0%, 100% {
      filter: brightness(1);
    }
    50% {
      filter: brightness(1.3) hue-rotate(30deg);
    }
  }

  @keyframes backgroundPulse {
    0%, 100% {
      opacity: var(--gradient-bg-opacity);
    }
    50% {
      opacity: calc(var(--gradient-bg-opacity) + 0.2);
    }
  }
}
